Skip to content

Commit

Permalink
Adopt the NO_COLOR standard
Browse files Browse the repository at this point in the history
  • Loading branch information
p-gen committed Feb 5, 2018
1 parent 26ab3b0 commit 70d3ee5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions smenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5510,9 +5510,15 @@ main(int argc, char * argv[])

/* Get some terminal capabilities */
/* """""""""""""""""""""""""""""" */
term.colors = tigetnum("colors");
if (term.colors < 0)

if (getenv("NO_COLOR") != NULL)
term.colors = 0;
else
{
term.colors = tigetnum("colors");
if (term.colors < 0)
term.colors = 0;
}

/* Set the default timeout to 0: no expiration */
/* """"""""""""""""""""""""""""""""""""""""""" */
Expand Down

0 comments on commit 70d3ee5

Please sign in to comment.